package com.xiaocao.xiaocaoapp.controller;

import com.xiaocao.xiaocaoapp.dao.MyTask;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@RequestMapping("kirosChe")
@Controller
public class DataController {
    @RequestMapping("getMyTaskData")
    @ResponseBody
    public List<MyTask> getMyTaskData(String userId){
        List<MyTask> resList = new ArrayList<>();
        MyTask myTask = new MyTask();
        myTask.setTaskId("1");
        myTask.setTaskContent("我是任务1");
        myTask.setTaskDate("2021-02-22");
        myTask.setTaskName("任务1名字");
        myTask.setTaskStatus("1");
        myTask.setTaskType("111");
        resList.add(myTask);
        myTask = new MyTask();
        myTask.setTaskId("2");
        myTask.setTaskContent("我是任务2");
        myTask.setTaskDate("2021-02-23");
        myTask.setTaskName("任务2名字");
        myTask.setTaskStatus("2");
        myTask.setTaskType("222");
        resList.add(myTask);
        return resList;
    }
}
